import request from '@/utils/request'
import { faceApiUrl } from "../config"

// 是否隐藏引用
export function isHideQuote(data) {
  return request({
    url: `${faceApiUrl}/comBusinessCostProjectPlanAdjust/isHideQuote?projectId=${data.projectId}`,
    method: 'get',
    data
  })
}

// 查询并新增并添加数据
export function queryAdjustTreeAndSave(data) {
  return request({
    url: `${faceApiUrl}/comBusinessCostProjectPlanAdjust/queryAdjustTreeAndSave?projectId=${data.projectId}`,
    method: 'get',
    data
  })
}

// 通过id查询详情
export function getDetail(data) {
  let isShow = data.isShow === false?false:true;
  return request({
    url: `${faceApiUrl}/comBusinessCostProjectPlanAdjust/findById?id=${data.id}&isHide=${data.isHide}&isShow=${isShow}`,
    method: 'get',
    data
  })
}

// 引用修改
export function updateQuote(data) {
  return request({
    url: `${faceApiUrl}/comBusinessCostProjectPlanAdjust/updateQuote?id=${data.id}&quote=${data.quote}`,
    method: 'get',
    data
  })
}

// 提交
export function submit(data) {
  return request({
    url: `${faceApiUrl}/comBusinessCostProjectPlanAdjust/submit`,
    method: 'post',
    data
  })
}
